import "core-js/stable"
import "regenerator-runtime/runtime"
import Vue from 'vue'
import App from './App.vue'
import VueRouter from "vue-router"
import router from "@/router/index"
import "@/utils/core/components_use"
import scroll from "vue-seamless-scroll"
import echarts from 'echarts'
import store from "./store"
import '@/less/reset.less'
import '@/less/common.less'
// import './permission'
import '@/utils/filter'
import VueI18n from 'vue-i18n'
import zh from '@/i18n/langs/zh'
import en from '@/i18n/langs/en'
Vue.use(VueI18n)
//实例化vue-i18n
const i18n = new VueI18n({
    // 从本地存储中取，如果没有默认为中文，
    // 这样可以解决切换语言后，没记住选择的语言，刷新页面后还是默认的语言
    // localStorage.getItem('lang') || 
    locale: 'zh',
    messages: {
      'zh': zh, // 中文语言包
      'en': en // 英文语言包
    }
  })
Vue.config.productionTip = false
Vue.use(VueRouter)
Vue.use(scroll)
Vue.prototype.$echarts = echarts
// Vue.use(VueAxios, axios)
// Vue.ues(request)
// VUE_APP_MOCK的值为true，并且在开发环境下
// if (process.env.VUE_APP_MOCK && process.env.NODE_ENV === 'development') {
// require('@/mock/mock.js')
// }
window.vueInstance = new Vue({
  router,
  store: store,
  i18n,
  render: h => h(App),
}).$mount('#app')